from django.contrib.auth.models import AbstractUser

from django.db import models


# Create your models here.
class CustomUser(AbstractUser):
    # blank = True 表单中可以不填，
    # null =True 允许在数据库中该字段存储 NULL 值。
    telephone = models.CharField(verbose_name="手机号", max_length=30, blank=True, null=True)
    head = models.ImageField(verbose_name="头像", max_length=30, upload_to='head', default='head/head.png')
    sex = models.CharField(verbose_name="性别", max_length=10,
                           choices=[('man', "男"), ('women', "女"), ('secret', "保密")], default="secret", help_text="默认保密")
